package com.yw.android.letsgo.api;

import com.yw.android.common.api.ApiConf;
import com.yw.android.common.api.ApiService;


public class PetService {
    private static final String Host = "https://pet-chain.baidu.com/";
    /**
     * 日志标签
     */
    private static final String TAG = "PetService";
    private static PetService mInstance;
    /**
     * 接口内容
     */
    private PetApi mPetApi;

    private PetService() {
        ApiConf mApiConf = new ApiConf.ApiConfBuilder()
                .withHost(Host)
                .withNetInterceptor(new AddCookiesInterceptor())
                .build();
        mPetApi = (PetApi) ApiService.getInstance().getInstanceApi(mApiConf, PetApi.class);
    }

    public static PetService getInstance() {
        if (mInstance == null)
            synchronized (TAG) {
                if (mInstance == null)
                    mInstance = new PetService();
            }
        return mInstance;
    }

    public PetApi getPetApi() {
        return mPetApi;
    }
}
